<?php
/**
 * @Project: None
 * @FileName: Py.php
 * @FilePath: D:\thinkphp6\tp\app\controller\Py.php
 * @Author: zishuiliufeng
 * @Date:   2021-01-28 17:21:49
 * @Last Modified by:   zishuiliufeng
 * @Last Modified time: 2021-02-15 22:33:31
 */
namespace app\controller;
use app\BaseController;
use app\Response;


class Py extends BaseController{

   public function index(){
        #$cmd = 'py D:\thinkphp6\py\func 1'
        #$output = shell_exec($cmd);
        #$cmd = "D:/python3/python.exe D:/thinkphp6/py/func"

        exec("D:/python3/python.exe D:/thinkphp6/py/func 1",$out,$re);
        #exec($cmd,$out,$re);
        $result = array(
            'out' => $out,
            're'  => $re
            );
        Response::show(200,'ok',$result);
   }
}